Skip to content

Renesas TSIP: skip XMEMCPY on MEMORY_E from tsip_StoreMessage()#10705

Merged
JacobBarthelmeh merged 1 commit into
wolfSSL:masterfrom
cconlon:tsipMemFix
Jun 16, 2026
Merged

Renesas TSIP: skip XMEMCPY on MEMORY_E from tsip_StoreMessage()#10705
JacobBarthelmeh merged 1 commit into
wolfSSL:masterfrom
cconlon:tsipMemFix

Conversation

@cconlon

@cconlon cconlon commented Jun 16, 2026

Copy link
Copy Markdown
Member

Description

This PR fixes the Renesas TSIP port's tsip_StoreMessage() to skip calling XMEMCPY when buffer sanity checks have failed.

Fixes item 9 from ZD 21992.

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

@cconlon cconlon self-assigned this Jun 16, 2026
Copilot AI review requested due to automatic review settings June 16, 2026 20:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes the Renesas TSIP TLS 1.3 handshake message buffering path by preventing message data from being copied into MsgBag after capacity/sanity checks have already failed (returning MEMORY_E). This avoids potential out-of-bounds writes/corruption in tsip_StoreMessage().

Changes:

  • Wraps the XMEMCPY() and related MsgBag index updates in an else block so they only execute when capacity checks pass.
  • Ensures the message bag is not mutated when ret is set to MEMORY_E.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cconlon cconlon added the For This Release Release version 5.9.2 label Jun 16, 2026
@cconlon cconlon assigned JacobBarthelmeh and unassigned cconlon Jun 16, 2026
@JacobBarthelmeh JacobBarthelmeh merged commit 6ff1f8f into wolfSSL:master Jun 16, 2026
304 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

For This Release Release version 5.9.2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants